The present invention relates to a gray-scale font generating apparatus in a gray-scale display device such as a general display for a personal computer or work station, a laser printer or a color printer.
As shown in FIG. 8, the term "gray-scale font" is a font with dots at the contour of a font being gradation-displayed by an intermediate gradation between font color and background color. This font permits a small font to be displayed clearly and a large font to have no irregularities at its inclined portions.
For this reason, a font which is the gray-scale font will not be deformed when its display position is shifted slightly.
The gray-scale font can be generated in such a way that the proportion of a font area (blend ratio) in a dot area in each of the dots located at the contour portion of the font is calculated, and background color and font color are blended in the calculated blend ratio to determine the color of the dots at the contour of the font.
Conventionally, in order to calculate the blend ratio for each of the dots constituting a font on the basis of vector font information, the following processing is carried out. First, vector data of a font is read and developed. The developed font is written or drawn to be superposed on a sub-pixel pattern supposed on a vast size of work memory for calculation assured previously (the sub-pixel pattern is composed of sub-pixels 32 obtained when one dot is divided in a matrix form). Namely, the sub-pixels 32 within a contour line 33 of the font are "painted over" as shown in FIG. 3. The number of the sub-pixels painted over is counted to be totaled for each dot. Thus, the proportion of the font area (blend ratio) for each of all the dots constituting the font can be calculated on the basis of (the number of the painted-over sub-pixels.div.the total number of the sub-pixels). The related art is disclosed in JP-A-63-313191.
In this way, in the conventional blend ratio calculating method, a font is once written on a work memory with sub-pixels when one dot is sub-divided by a factor of several, and the state after writing must be examined for each dot to count the number of the painted sub-pixels. Such processing takes a long time. In this case, as the number of gradation increases, the number of sub-pixels in each dot, i.e., size of the work memory which is required in processing of once writing the font increases proportionately (for example, as shown in FIG. 15, four gradations result in four times of a binary digit; 16 (sixteen) gradations result in 16 times; and 64 gradations result in 64 times). This also increases the processing time. Thus, a vast size of work memory which is not practical must be secured.
In short, the above prior art, in which in order to calculate the proportion of a font region in each of the dots constituting a font, the output font is once written on a work memory consisting of sub-pixels obtained when each dot is sub-divided by a factor of several, has the problem that a vast size of work memory must be prepared.
The prior art, in which the size of memory varies greatly with the number of gradations, has also the problem that it is not practical.
The prior art, in which the state after writing must be examined for each dot to count the number of painted-over sub-pixels, also has the problem that the time taken for the writing and counting is long and the processing time varies greatly with the size of a font and the number of gradations.